from datetime import datetime

from django.shortcuts import render

# Create your views here.

def index1(request):
    return render(request,'index.html',context={'city': '北京'})

def index2(request):
    context = {
        'city': '北京',
        'adict': {
            'name': '西游记',
            'author': '吴承恩',
        },
        'alist': [1, 2, 3, 4, 5],
        'children': {
            'name': '小歘歘',
            'age': 5
        },
        'html':'<span style="color:red">巴拉巴拉</span>',
        'date':datetime.now()
    }
    return render(request, 'index.html', context=context)

def extend_view(request):
    return render(request, 'child.html')
